#ifndef __NODE_DATA_H
#define __NODE_DATA_H

#include <stdint.h>
#include <stdbool.h>

#define MAX_NODE_NUMBER 5

typedef struct
{
    bool online;
    bool alarm;
    uint8_t battary;
}one_node_t;


typedef struct 
{
    uint8_t count;     //all node count    
    one_node_t dev[MAX_NODE_NUMBER];
}nodes_t;


bool node_set_online(uint8_t number,bool if_online);
bool node_set_alarm(uint8_t number,bool if_alarm);
bool node_set_battary(uint8_t number,uint8_t bat);

uint8_t node_get_count(void);
bool    node_get_online(uint8_t number);
bool    node_get_alarm(uint8_t alarm);
bool    node_get_battary(uint8_t alarm);

#endif
